import java.util.*;

public class Main {
    public static void main(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);

        Deque<Integer> stack = new ArrayDeque<>(); //双端队列的线性实现
        Deque<Integer> queue = new LinkedList<>(); //双端队列的链式实现

        queue.add(1);
        queue.offer(2);
        queue.push(3);

        stack.add(1);
        stack.offer(2);
        stack.push(3);
    }
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);//普通队列的进入
        queue.offer(2);
        queue.offer(3);

        System.out.println(queue.poll());//弹出最先进入的值并删除

    }
}